package com.qiaofang.common.mq.rabbitmq.bean;

import java.io.Serializable;

/**
 * apollo内部使用的消息体
 */
public class MqSendData implements Serializable {
    private static final long serialVersionUID = 9006648487010297181L;
    public static final Integer MSGTYPE_PRODUCT = 1;
    public static final Integer MSGTYPE_CONSUME = 2;
    //必填字段开始-------------------------
    private String tag;//标识队列特殊逻辑
    private Object data;//必须传送的对象必须要序列化 并且要指定序列化id 默认为1都行
    private String remoteSynCompanyUuid;//rabbitmq同步到另外一台服务器上的uuid，或者是母公司同步到子公司的数据库去
    private String msgKey;//消息的业务标识
    //必填字段结束------------------------

    /**
     * 下面这些属性都不需要设置
     */
    private String applicationName;//发送的应用名称
    private String msgId;//消息唯一性标识，没有就自动生成,因为现在apollo到apollo都是使用这个对象，所有消息的标识通过这个来识别
    private String traceId;//消息的发送id
    private String spanId;//spanId

    public String getSpanId() {
        return spanId;
    }

    public void setSpanId(String spanId) {
        this.spanId = spanId;
    }

    public String getTraceId() {
        return traceId;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public String getMsgKey() {
        return msgKey;
    }

    public void setMsgKey(String msgKey) {
        this.msgKey = msgKey;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public String getRemoteSynCompanyUuid() {
        return remoteSynCompanyUuid;
    }

    public void setRemoteSynCompanyUuid(String remoteSynCompanyUuid) {
        this.remoteSynCompanyUuid = remoteSynCompanyUuid;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
